package sw6.visualschedule.entities;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.util.Date;

@DatabaseTable(tableName = "activitystatus")
public class ActivityStatus {
    public static final String ACTIVITY_ID_FIELD = "activity_id";
    public static final String DATETIME_FIELD = "datetime";
    public static final String STATUS_FIELD = "status";

    @DatabaseField(columnName = ACTIVITY_ID_FIELD, foreign = true, index = true)
    private transient ScheduleActivity mActivity;
    
    @DatabaseField(columnName = DATETIME_FIELD, index = true)
    private transient Date mDateTime;
    
    @DatabaseField(generatedId = true)
    private transient Integer mId;
    
    @DatabaseField(columnName = STATUS_FIELD)
    private transient ActivityStatusType mStatus;
    
    public ActivityStatus(final ScheduleActivity activity, final Date datetime) {
        mActivity = activity;
        mDateTime = datetime;
    }
    
    ActivityStatus() {
        // all persisted classes must define a no-arg constructor with at least package visibility
    }
    
    public ScheduleActivity getActivity() {
        return mActivity;
    }
    
    public Date getDateTime() {
        return mDateTime;
    }
    
    public Integer getId() {
        return mId;
    }
    
    public ActivityStatusType getStatus() {
        return mStatus;
    }
    
    public void setStatus(final ActivityStatusType status) {
        mStatus = status;
    }
    
}